package com.jianqiao.delivery.pay.domain.confirmr2p;

import lombok.Data;

/**
 * author: cyx
 * create: 2024/11/25 8:53
 **/
@Data
public class ConfirmR2PEntity {
    private String creationDateTime;

    private String endToEndId;

    private String paymentRequestId;

    private String requestMessageId;

    private String transactionStatus;

    private SettlementDetailsEntity settlementDetails;

    public ConfirmR2PEntity(String creationDateTime, String endToEndId, String paymentRequestId, String requestMessageId, String transactionStatus, SettlementDetailsEntity settlementDetails) {
        this.creationDateTime = creationDateTime;
        this.endToEndId = endToEndId;
        this.paymentRequestId = paymentRequestId;
        this.requestMessageId = requestMessageId;
        this.transactionStatus = transactionStatus;
        this.settlementDetails = settlementDetails;
    }

    public static ConfirmR2PEntityBuild builder() {
        return new ConfirmR2PEntityBuild();
    }

    public static class ConfirmR2PEntityBuild{
        private String creationDateTime;

        private String endToEndId;

        private String paymentRequestId;

        private String requestMessageId;

        private String transactionStatus;

        private SettlementDetailsEntity settlementDetails;

        ConfirmR2PEntityBuild() {

        }

        public ConfirmR2PEntityBuild creationDateTime(final String creationDateTime) {
            this.creationDateTime = creationDateTime;
            return this;
        }

        public ConfirmR2PEntityBuild endToEndId(final String endToEndId) {
            this.endToEndId = endToEndId;
            return this;
        }

        public ConfirmR2PEntityBuild paymentRequestId(final String paymentRequestId) {
            this.paymentRequestId = paymentRequestId;
            return this;
        }

        public ConfirmR2PEntityBuild requestMessageId(final String requestMessageId) {
            this.requestMessageId = requestMessageId;
            return this;
        }

        public ConfirmR2PEntityBuild transactionStatus(final String transactionStatus) {
            this.transactionStatus = transactionStatus;
            return this;
        }

        public ConfirmR2PEntityBuild settlementDetails(final SettlementDetailsEntity settlementDetails) {
            this.settlementDetails = settlementDetails;
            return this;
        }

        public ConfirmR2PEntity build() {
            return new ConfirmR2PEntity(this.creationDateTime ,
                                        this.endToEndId ,
                                        this.paymentRequestId ,
                                        this.requestMessageId ,
                                        this.transactionStatus ,
                                        this.settlementDetails);
        }
    }
}
